import request from '@/config/axios'
import { CourseVO } from '.'

const baseURL = '/train/platform-course-mapping'

export const bind = async (courseIds: CourseVO['id'][]) =>
  request.post<boolean>({
    url: `${baseURL}/create`,
    data: { platformCourseIds: courseIds }
  })

export const unbind = async (courseIds: CourseVO['id'][]) =>
  request.delete<boolean>({
    url: `${baseURL}/delete`,
    data: { platformCourseIds: courseIds }
  })
